#include "include/x86emu_int.h"
#include <eku/symbol.h>

static int
module_load(void)
{
	 export_symbol("x86emu_new", &x86emu_new, 1);
	 export_symbol("x86emu_done", &x86emu_done, 1);
	 export_symbol("x86emu_clone", &x86emu_clone, 1);

	 export_symbol("x86emu_reset", &x86emu_reset, 1);
	 export_symbol("x86emu_run", &x86emu_run, 1);
	 export_symbol("x86emu_stop", &x86emu_stop, 1);

	 export_symbol("x86emu_set_log", &x86emu_set_log, 1);
	 export_symbol("x86emu_clear_log", &x86emu_clear_log, 1);
	 export_symbol("x86emu_log", &x86emu_log, 1);
	 export_symbol("x86emu_dump", &x86emu_dump, 1);

	 export_symbol("x86emu_set_perm", &x86emu_set_perm, 1);
	 export_symbol("x86emu_set_io_perm", &x86emu_set_io_perm, 1);
	 export_symbol("x86emu_set_page", &x86emu_set_page, 1);
	 export_symbol("x86emu_reset_access_stats", &x86emu_reset_access_stats, 1);

	 export_symbol("x86emu_set_code_handler", &x86emu_set_code_handler, 1);
	 export_symbol("x86emu_set_intr_handler", &x86emu_set_intr_handler, 1);
	 export_symbol("x86emu_set_memio_handler", &x86emu_set_memio_handler, 1);

	 export_symbol("x86emu_intr_raise", &x86emu_intr_raise, 1);

	 export_symbol("x86emu_read_byte", &x86emu_read_byte, 1);
	 export_symbol("x86emu_read_byte_noperm", &x86emu_read_byte_noperm, 1);
	 export_symbol("x86emu_read_word", &x86emu_read_word, 1);
	 export_symbol("x86emu_read_dword", &x86emu_read_dword, 1);
	 export_symbol("x86emu_write_byte", &x86emu_write_byte, 1);
	 export_symbol("x86emu_write_byte_noperm", &x86emu_write_byte_noperm, 1);
	 export_symbol("x86emu_write_word", &x86emu_write_word, 1);
	 export_symbol("x86emu_write_dword", &x86emu_write_dword, 1);

	 export_symbol("x86emu_set_seg_register", &x86emu_set_seg_register, 1);
	 return 0;
}

static int
module_unload(void)
{
	 return 0;
}
